package com.bbcare.exportExcel.plat.vo;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class DataExcelRow {
    private String userName;
    private String gender;
    private String pregnancy;
    private String expected;
    private String phone;
    private String inhospitalNo;//住院号。
    private String birthday;    //本行数据映射宝宝的出生日期。
    private String archiveday;  //本行数据映射宝宝的建档日期。
    private String rowId;   //就是userId。
    private String followupDate;    //随访日期。
    private String followupDoctor;  //随访医生。
    private Map<String,String> questionMap  = new HashMap<>();

    public String getRowId()    {return this.rowId;}
    public void setRowId(final String id)   {this.rowId=id;}
    public void setUserName(final String name)  {this.userName=name;}
    public String getUserName() {return this.userName;}
    public void addQuestionAnswer(final String questionId, final String questionAnswer) {
        questionMap.put(questionId,questionAnswer);
    }
    public String getColValue(final String colId) {
        return questionMap.get(colId);
    }

    public void setBirthday(final String day)   {this.birthday=day;}
    public String getBirthday() {return this.birthday;}
    public void setArchiveday(final String day) {this.archiveday=day;}
    public String getArchiveday()   {return this.archiveday;}
    public void setFollowupDate(final String day)   {
        this.followupDate   = day;
    }
    public String getFollowupDate() {return this.followupDate;}

    public void setFollowupDoctor(final String doctor)  {this.followupDoctor=doctor;}
    public String getFollowupDoctor()   {return this.followupDoctor;}

    public String toString()    {
        StringBuffer sb = new StringBuffer();
        sb.append("rowId:").append(getRowId()).append(", 姓名：").append(getUserName()).append(",");
        Set<String> keys= this.questionMap.keySet();
        Iterator<String> iter   = keys.iterator();
        String key;
        Object v;
        while (iter.hasNext())    {
            key = iter.next();
            v   = this.questionMap.get(key);
            if (null != v && !((String) v).isEmpty())   {
                sb.append(key).append(":").append(v).append(",");
            }
        }
        sb.append("\n");
        return sb.toString();
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPregnancy() {
        return pregnancy;
    }

    public void setPregnancy(String pregnancy) {
        this.pregnancy = pregnancy;
    }

    public String getExpected() {
        return expected;
    }

    public void setExpected(String expected) {
        this.expected = expected;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getInhospitalNo() {
        return inhospitalNo;
    }

    public void setInhospitalNo(String inhospitalNo) {
        this.inhospitalNo = inhospitalNo;
    }
}
